/**
 * 2016年10月26日
 */
package jdk;

/**
 * @author Alex
 *
 */
public class StaticDispatch {
	static class Human{
		public void  sayHello(){
			System.out.println("hello guy");
		}
	};
	static class Man extends Human{
		public void sayHello(){
			System.out.println("hello man");
		}
	}
	static class Woman extends Human{

		public void sayHello(){
			System.out.println("hello woman");
		}
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		StaticDispatch sd = new StaticDispatch();
		Human h1 = new Man();
//		Human h2 = new Woman();
		h1.sayHello();
//		sd.sayHello(h2);

	}

}
